/**   
 * @Title: PubDiscountDaoImpl.java 
 * @Package com.leesche.zcsp.node.dao.impl 
 * @Description:() 
 * @author dennies yang
 * @date 2016年9月22日 下午3:28:33 
 * @version V1.0   
 */
package com.leesche.zcsp.node.web.dao.impl;

import java.util.List;

import com.leesche.zcsp.node.web.dao.PubDiscountDao;
import com.leesche.zcsp.node.web.model.PubDiscount;
import com.leesche.zcsp.node.web.model.PubDiscountCriteria;
import com.leesche.zcsp.node.web.service.impl.data.read.PubDiscountDto;
import com.leesche.zcsp.node.web.service.impl.data.read.QueryPubDiscountCondition;
import org.apache.ibatis.annotations.Param;

/**
 * @Title: PubDiscountDaoImpl.java
 * @Package com.leesche.zcsp.node.dao.impl
 * @Description:()
 * @author dennies yang
 * @date 2016年9月22日 下午3:28:33
 * @version V1.0
 */
public class PubDiscountDaoImpl
		extends
		BaseDaoImpl<PubDiscount, PubDiscountCriteria, PubDiscountDto, QueryPubDiscountCondition, Long>
		implements PubDiscountDao {
	
	 private static final String DB_SELECTDISCOUNTBYSHORTCODE="selectByShortCode";

	/* (non-Javadoc)
	 * @see com.leesche.zcsp.node.web.dao.PubDiscountDao#selectByShortCode(com.leesche.zcsp.node.web.service.impl.data.read.QueryPubDiscountCondition)
	 */
	@Override
	public  List<PubDiscountDto> selectByShortCode(QueryPubDiscountCondition condition) {
		// TODO Auto-generated method stub
		return this.getSqlSession().selectList(
				this.getStatement(DB_SELECTDISCOUNTBYSHORTCODE), condition);
	}

	@Override
	public List<PubDiscountDto> findPubDiscountList(QueryPubDiscountCondition condition) {
		return null;
	}

	/**
	 * @Title: insertBatchDiscount(List<PubDiscount> discounts)
	 * @Description: TODO( 批量添加设备套餐 )
	 * @author Jerry
	 * @date 2016-11-04 01:03:16
	 * @param discounts 设备套餐集合
	 * @return 数据库操作受影响的行数
	 */
	@Override
	public int insertBatchDiscount(List<PubDiscount> discounts) {
		return this.getSqlSession().insert(this.getStatement("insertBatchDiscount"),discounts);
	}

}
